﻿@using DevExpress.Web.Mvc.UI
@using Dogshow.Web.Utils
@model Dogshow.Model.Korisnik
@{
    ViewBag.Title = "Dogshow - korisnički nalog";
}
<div>
@using (Html.BeginForm("Detalji", "Korisnici", FormMethod.Post, new { @class = "edit_form" }))
{
    
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "Korisničko ime:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "KorisnickoIme";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "KorisnickoIme";
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
       textEdit.ReadOnly = true;
   }).Bind(Model.KorisnickoIme).GetHtml()
    </div>
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "Naziv korisnika:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "Naziv";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "Naziv";
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
   }).Bind(Model.Naziv).GetHtml()
    </div>
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "Lozinka:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "VidljivaLozinka";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "VidljivaLozinka";
       //textEdit.Properties.Password = true;
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
   }).Bind(Model.VidljivaLozinka).GetHtml()
    </div>
    @Html.HiddenFor(x => x.VrstaKorisnika)
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "Adresa:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "Adresa";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "Adresa";
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
   }).Bind(Model.Adresa).GetHtml()
    </div>
    <div class="line">
        @Html.DevExpress().Label(label =>
        {
            label.Text = "Mesto:";
            label.ControlStyle.CssClass = "label";
            label.AssociatedControlName = "IdMesta";
        }).GetHtml()
        @Html.PartialOrNull("MestaCombo", Model.IdMesta)
    </div>
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "Telefon:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "Telefon";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "Telefon";
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
   }).Bind(Model.Telefon).GetHtml()
    </div>
    <div class="line">
        @Html.DevExpress().Label(label =>
   {
       label.Text = "E-Mail:";
       label.ControlStyle.CssClass = "label";
       label.AssociatedControlName = "Email";
   }).GetHtml()
        @Html.DevExpress().TextBox(textEdit =>
   {
       textEdit.Name = "Email";
       textEdit.Properties.ConvertEmptyStringToNull = true;
       textEdit.ShowModelErrors = true;
       textEdit.ControlStyle.CssClass = "editor";
   }).Bind(Model.Email).GetHtml()
    </div>
    @Html.HiddenFor(x => x.Aktivan)
    <div class="line">
        @Html.DevExpress().Button(s =>
   {
       s.Name = "btnSacuvaj";
       s.Text = "Sačuvaj";
       s.ControlStyle.CssClass = "btnSave";
       s.UseSubmitBehavior = true;
   }).GetHtml()
    </div>
    
}

</div>

    

